import request from "@/utils/request";

// 查询自行车列表
export function listBike(query) {
  return request({
    url: "/bike/list",
    method: "get",
    params: query,
  });
}

// 查询自行车详情
export function getBike(bikeId) {
  return request({
    url: "/bike/" + bikeId,
    method: "get",
  });
}

// 新增自行车
export function addBike(data) {
  return request({
    url: "/bike",
    method: "post",
    data: data,
  });
}

// 修改自行车
export function updateBike(data) {
  return request({
    url: "/bike",
    method: "put",
    data: data,
  });
}

// 删除自行车
export function deleteBike(bikeId) {
  return request({
    url: "/bike/" + bikeId,
    method: "delete",
  });
}
